﻿using System;

namespace IOA.MES.Log.DataAccess.VModel
{
    /// <summary>
    /// 操作日志
    /// </summary>
    public class VOprLog : BaseVModel
    {
        private string _subjectType = string.Empty;
        private string _subjectNo = string.Empty;
        private string _opeatorName = string.Empty;
        private string _logName = string.Empty;
        private string _logStatus = string.Empty;
        private string _logContent = string.Empty;

        #region Public Property

        ///<Summary>
        /// 记录对象类型
        ///</Summary>
        public string SubjectType
        {
            get { return string.IsNullOrWhiteSpace(_subjectType) ? string.Empty : _subjectType; }
            set { _subjectType = value; }
        }

        ///<Summary>
        /// 记录对象编号
        ///</Summary>
        public string SubjectNo
        {
            get { return string.IsNullOrWhiteSpace(_subjectNo) ? string.Empty : _subjectNo; }
            set { _subjectNo = value; }
        }

        ///<Summary>
        /// 操作人ID
        ///</Summary>
        public int OpeatorId { get; set; }

        ///<Summary>
        /// 操作人名称
        ///</Summary>
        public string OpeatorName
        {
            get { return string.IsNullOrWhiteSpace(_opeatorName) ? string.Empty : _opeatorName; }
            set { _opeatorName = value; }
        }

        ///<Summary>
        /// 日志名称
        ///</Summary>
        public string LogName
        {
            get { return string.IsNullOrWhiteSpace(_logName) ? string.Empty : _logName; }
            set { _logName = value; }
        }

        ///<Summary>
        /// 日志时间
        ///</Summary>
        public DateTime LogTime { get; set; }

        ///<Summary>
        /// 日志状态
        ///</Summary>
        public string LogStatus
        {
            get { return string.IsNullOrWhiteSpace(_logStatus) ? string.Empty : _logStatus; }
            set { _logStatus = value; }
        }

        ///<Summary>
        /// 日志内容
        ///</Summary>
        public string LogContent
        {
            get { return string.IsNullOrWhiteSpace(_logContent) ? string.Empty : _logContent; }
            set { _logContent = value; }
        }
        #endregion

        public string LogTimeStr { get { return LogTime.ToString("yyyy-MM-dd HH:mm:ss"); } }
    }
}
